<?php

use League\CommonMark\CommonMarkConverter;
use League\CommonMark\Environment\Environment;
use League\CommonMark\Extension\Autolink\AutolinkExtension;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
use League\CommonMark\MarkdownConverter;

require_once __DIR__.'/init.php';

$content = '';

$environment = new Environment($config);
$environment->addExtension(new CommonMarkCoreExtension());

// Add this extension
$environment->addExtension(new AutolinkExtension());

// Instantiate the converter engine and start converting some Markdown!
$converter = new MarkdownConverter($environment);

$content = $converter->convert(file_get_contents(ROOT_PATH.'/README.md'));
?>

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ul-free-free-map 开源免费地图解决方案</title>
    <link rel="stylesheet" href="//delivery.ulthon.com/github-markdown-css-main/github-markdown.css">
    <style>
        .markdown-body li {
            list-style: inherit
        }
    </style>
</head>

<body>
    <?php include PUBLIC_PATH.'/header.php' ?>
    <?php include PUBLIC_PATH.'/left.php' ?>

    <div class="main-code">
        <div class="markdown-body ">
            <?php echo $content;?>
        </div>
    </div>
</body>

</html>